package com.example.demo2.generator.service.impl;

import com.example.demo2.generator.entity.User;
import com.example.demo2.generator.mapper.UserDao;
import com.example.demo2.generator.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Login)表服务实现类
 * @author makejava
 * @since 2024-09-07 13:55:52
 */

@Service("loginService")
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    @Override
    public User queryByPwdAnd(String username, String password) {
        User login = userDao.queryByPwdAnd(username, password);
        System.out.println(login);
        return login;
    }
    @Override
    public List<User> queryAllLogin() {
        return userDao.queryAllLogin();
    }

    @Override
    public int getLoginByCount() {
        return userDao.getLoginCount();
    }
}
